<#import "_setup.html" as s>

<@s.scaffold title="Maven">
	<@s.introduction>
		<p>
			To set up lombok with any build tool, you have to specify that the lombok dependency is required to compile your source code, but does not need to be present when running/testing/jarring/otherwise deploying your code. Generally this is called a 'provided' dependency. This page explains how to integrate lombok with the <a href="https://maven.apache.org/">Apache Maven</a> build tool.
		</p><p>
			Lombok is available in maven central, so telling Maven to download lombok is easy.
		</p>
	</@s.introduction>

	<@s.section title="Adding lombok to your pom file">
		<p>
			To include lombok as a 'provided' dependency, add it to your <code>&lt;dependencies&gt;</code> block like so:<pre>
&lt;dependencies&gt;
	&lt;dependency&gt;
		&lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
		&lt;artifactId&gt;lombok&lt;/artifactId&gt;
		&lt;version&gt;${version}&lt;/version&gt;
		&lt;scope&gt;provided&lt;/scope&gt;
	&lt;/dependency&gt;
&lt;/dependencies&gt;
</pre>
		</p>
	</@s.section>

	<@s.section title="JDK9+ with module-info.java">
		<p>
			The configuration of the compiler plug-in should contain the following:<pre>
&lt;annotationProcessorPaths&gt;
	&lt;path&gt;
		&lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
		&lt;artifactId&gt;lombok&lt;/artifactId&gt;
		&lt;version&gt;${version}&lt;/version&gt;
	&lt;/path&gt;
&lt;/annotationProcessorPaths&gt;
</pre>
		</p>
	</@s.section>

	<@s.section title="Delomboking: The Lombok Maven Plugin">
		<p>
			There is a plugin for Maven that we recommend you use if you want to delombok via maven. Useful if you want to run source analysis tools on your source <em>after</em> lombok has been applied, or if you want to generate javadoc. The plugin is open source. Read more <a href="http://awhitford.github.io/lombok.maven/lombok-maven-plugin/">about the lombok maven plugin</a>.
		</p>
	</@s.section>
</@s.scaffold>
